home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / luxman-0.002 / lux41b.tar / lux / HOWTO.Modify < prev    next >
Text File  |  1995-03-29  |  8KB  |  253 lines

  1. ===========================================================================
  2.                           Modifying LuxMan
  3. ===========================================================================
  4.  
  5. This file documents how to modify LuxMan from an external point
  6. of view. That is, this file tells you how you can change the game
  7. without recompiling the source code.
  8.  
  9. ===========================================================================
  10.  Level files:
  11. ===========================================================================
  12.  
  13. A level file is a text file which describes the playing order
  14. of a game. The level files included with LuxMan are `levels.def'
  15. and `old.def'. These files have a very simple structure. They
  16. are simply a collection of bracketed sections of the form:
  17.  
  18. {
  19.     maze = m1.map
  20.     tile = tile14.map
  21.     fruit = cherry.map
  22.     depth = 18
  23.     regen_wait = 200
  24.     fruit_val = 100
  25.     fruit_quota = 10
  26.     bg = BLACK
  27.     dot = YELLOW
  28.     bigdot = YELLOW
  29.     ghost_blue = 100
  30.     ghost_flash = 60
  31.     lux_body = YELLOW
  32.     glasses = BLACK
  33. }
  34.  
  35. Not all parameters are required. They may be listed in any order.
  36. You may have as many levels in the level file as you wish. All
  37. unrecognized lines are ignored.
  38.  
  39. Here is a description of all settable parameters:
  40.  
  41. Name        Type        Description
  42. ----        ----        -----------
  43. maze        filename    Name of bitmap to use for maze.
  44. tile        filename    Name of bitmap to use to paint walls.
  45. fruit        filename    Name of bitmap to use for fruit.
  46. depth        integer        Search depth for eyes (finding path to home).
  47. regen_wait    integer        Number of frames for eyes to wait (after
  48.                 they get home) before regenerating.
  49. fruit_val    integer        Point value of fruit.
  50. fruit_quota    integer        Maximum number of fruit allowed to appear
  51.                 per life (i.e. if you get killed it is
  52.                 reset).
  53. fruit_off    integer        Number of frames for fruit to stay off.
  54. fruit_on    integer        Number of frames for fruit to turn on.
  55. bg        COLOR        Background color of screen.
  56. dot        COLOR        Color of dots.
  57. bigdot        COLOR        Color of `power pills'.
  58. ghost_blue    integer        Number of frames for ghosts to remain blue.
  59. ghost_flash    integer        Number of frames for ghosts to flash.
  60.                 (i.e. the total energized period =
  61.                  ghost_blue + ghost_flash)
  62. lux_body    COLOR        Color of LuxMan body
  63. glasses        COLOR        Color of LuxMan sunglasses
  64.  
  65. Here is a description of the data types:
  66.  
  67. Type        Description
  68. ----        -----------
  69. filename    Any legal filename. Not surrounded by quotes.
  70. integer        An integer.
  71. COLOR        One of the following strings:
  72.             BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN,
  73.                 LIGHTGRAY, DARKGRAY, LIGHTBLUE, LIGHTGREEN,
  74.             LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW,
  75.             WHITE
  76.  
  77. Here are the default values for each parameter:
  78.  
  79. Parameter    Default
  80. ---------    -------
  81. maze        None    (REQUIRED PARAMETER)
  82. tile        None    (REQUIRED PARAMETER)
  83. fruit        None    (REQUIRED PARAMETER)
  84. depth        None    (REQUIRED PARAMETER)
  85. regen_wait    0
  86. fruit_val    100
  87. fruit_quota    100
  88. fruit_off    200
  89. fruit_on    200
  90. bg        BLACK
  91. dot        YELLOW
  92. bigdot        YELLOW
  93. ghost_blue    100
  94. ghost_flash    60
  95. lux_body    YELLOW
  96. glasses        BLACK
  97.  
  98. ========================
  99.  Checking a level file:
  100. ========================
  101.  
  102. If you modify a level file, it is VERY important that you check
  103. the modified file with the program `luxchk'. The basic usage
  104. is:
  105.  
  106.     luxchk levels.def
  107.  
  108. (Assuming the file is named `levels.def').
  109.  
  110. This will check that all required parameters are there, and,
  111. more importantly, it will make sure that the search depth
  112. you specified for each level is sufficient.
  113.  
  114. If you do not check the file with luxchk, LuxMan may
  115. abruptly exit (even during a game!) which is sort of ugly.
  116.  
  117. luxchk expects to find:
  118.  (1) the level file in the current directory
  119.  (2) bitmap images (fruit, ghosts, etc.) in a subdirectory
  120.      `maps' under the current directory
  121.  (3) mazes in a subdirectory `mazes' under the current subdirectory
  122.  
  123. ===========================================================================
  124.  Scenarios File:
  125. ===========================================================================
  126.  
  127. A scenarios file is a text file describing all the level files
  128. you want to be able to choose from in a game. The default
  129. scenarios file is named `scenarios'. It is pretty self
  130. explanatory:
  131.  
  132. (Begin included file)
  133. #
  134. # This is a scenarios file.
  135. #
  136. # The format is very simple - lines of the form:
  137. #
  138. # |description|filename|base_dir|
  139. #
  140. # `description' may be any string (excluding |'s).
  141. # `filename' must be the name of a level file.
  142. # `base_dir' is the directory under which LuxMan expects to
  143. #  find:
  144. #     (base_dir)/fonts
  145. #    (base_dir)/maps
  146. #    (base_dir)/mazes
  147. #    (base_dir)/11k
  148. #
  149. #  `base_dir' may be a list of paths to check, e.g.:
  150. #    `.:/usr/games/lib/luxman/my_scenario'
  151. #
  152. # The level file must be in (base_dir).
  153. #
  154. |Modern|levels.def|.:/usr/games/lib/luxman/modern|
  155. |Original (0.26)|old.def|.:/usr/games/lib/luxman/oldscen|
  156.  
  157. (End of included file)
  158.  
  159. The scenarios file may be located either in the current
  160. directory or in /usr/games/lib/luxman.
  161.  
  162. -f
  163. --
  164.  
  165. The -f parameter tells LuxMan what filename to use as the scenarios
  166. file. The default is `scenarios'. If you make a new scenarios file,
  167. say, `scen2', you would just say:
  168.  
  169.     luxman -f scen2
  170.  
  171. ====================================================================
  172.  Mazes:
  173. ====================================================================
  174.  
  175. A maze is a simple bitmap. These can be edited using the program
  176. `maped', located in the `gtools' subdirectory of the main lux
  177. source tree. `maped' requires a mouse.
  178.  
  179. Various maze elements are color coded as follows:
  180.  
  181. Element        Color(s)
  182. -------        --------
  183. Ghosts        Lightblue, Red, Magenta, Green (all 4 required)
  184. LuxMan        Cyan
  185. Tile (wall)    White
  186. No dot        (Transparent)
  187. Ghost home    Darkgray
  188. Bigdot        Yellow
  189. Fruit        Lightred
  190.  
  191. A few notes:
  192. ------------
  193. (1) Dots are placed EVERYWHERE except:
  194.     (a) LuxMan location
  195.     (b) Tile locations
  196.     (c) Bigdot (power pill) location
  197.     (d) Ghost home
  198.     (e) Squares marked with `No dot' color.
  199.  
  200. (2) The `transparent' color is the color located on the right side
  201.     of the screen in `maped', just above the main 16-color palette.
  202.  
  203. (3) If no `fruit' location is specified, it will default to the
  204.     LuxMan location.
  205.  
  206. ====================================================================
  207.  Images:
  208. ====================================================================
  209.  
  210. The tiles, ghosts, luxman, fruit and home tile are just bitmaps.
  211. You can edit them, or create new ones with the program `maped'
  212. in the `gtools' subdirectory. `maped' requires a mouse.
  213.  
  214. ====================================================================
  215.  Directory structure:
  216. ====================================================================
  217.  
  218. Just to put all of this in one place, the directory structure is
  219. documented here.
  220.  
  221. Scenarios files:
  222.     The current directory is searched first, followed by
  223.     /usr/games/lib/luxman.
  224.  
  225. Level files:
  226.     These are expected to be in the `base directory' specified
  227.     in the scenarios file.
  228.  
  229. Bitmaps (tiles, images, fonts):
  230.     These should be found in a subdirectory called `maps'
  231.     underneath the `base directory' given in the scenario
  232.     file.
  233.  
  234. Mazes:
  235.     These should be located in a subdirectory called `mazes'
  236.     underneath the `base directory' given in the scenario
  237.     file.
  238.  
  239. Sounds:
  240.     The subdirectory `11k' underneath the current directory
  241.     is searched first, followed by /usr/games/lib/luxman/11k.
  242.  
  243. For an example, see the directory /usr/games/lib/luxman/modern
  244. (this requires that you install LuxMan).
  245.  
  246. ====================================================================
  247.  
  248. If you spot any bugs in this document, or have suggestions for
  249. improvements, send mail to:
  250.  
  251. frankm@nuance.com
  252.  
  253.